/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-16 15:03:11
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-08-28 16:09:25
 * @FilePath: \grazlink20\uc_sys\src\api\fa\pasture\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 * 接口
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 牧场列表
export const zcPastureListAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcPastureListAdmin',
      data: data
    }
  })
}

// 列表
export const adminFaPastureListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureList',
      data: data
    }
  })
}

// 新增
export const adminFaPastureAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureAdd',
      data: data
    }
  })
}

// 查看
export const adminFaPastureSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureSee',
      data: data
    }
  })
}

// 修改
export const adminFaPastureEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureEdit',
      data: data
    }
  })
}

// 删除
export const adminFaPastureDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureDel',
      data: data
    }
  })
}

// 删除
export const adminFaPastureBatchDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaPastureBatchDel',
      data: data
    }
  })
}

// 选择牧场
export const zcPastureListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcPastureList',
      data: data
    }
  })
}

// 编辑牧场
export const zcPastureEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcPastureEdit',
      data: data
    }
  })
}

// 查看牧场
export const zcPastureSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcPastureSee',
      data: data
    }
  })
}
